package com.jhh.pay.center.cfg;

import akka.actor.ActorSystem;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author tangxd
 * @Description: TODO
 * @date 2017/12/7
 */
@Configuration
public class SpringActorConfiguration {

    private final static String ACTOR_NAME = "pay-center";

    @Bean
    public ActorSystem actorSystem() {
        return ActorSystem.create(ACTOR_NAME, akkaConfiguration());
    }

    @Bean
    public Config akkaConfiguration() {
        return ConfigFactory.load();
    }
}
